package com.dd.cloud.user.entity.educationvisit;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.checkerframework.checker.units.qual.C;

import java.time.LocalDateTime;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "发送患教/随访/用药记录表")
public class PatientEducationVisitPushRecord {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 订单号
     */
    @Column(comment = "订单号", length = 32)
    private String orderNo;

    /**
     * 处方号
     */
    @Column(comment = "处方号", length = 32)
    private String tencode;


    /**
     * 患者id
     */
    @Column(comment = "患者id")
    private String medId;

    /**
     * 患教文章id
     */
    @Column(comment = "患教/随访id 若为用药提醒则为空", length = 4)
    private Integer educationVisitId;


    /**
     * 患教/随访标题
     */
    @Column(comment = "患教/随访标题")
    private String title;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 推送时间
     */
    @Column(comment = "推送时间")
    private LocalDateTime sendDate;

    /**
     * 类型
     */
    @Column(comment = "类型 1.患教 2.问卷随访 3.电话随访 4.用药提醒")
    private Integer type;


    /**
     * 发送人
     */
    @Column(comment = "发送人", length = 32)
    private String sendName;


    /**
     * 发送人类型
     */
    @Column(comment = "发送人类型 同登录类型")
    private Integer sendType;


    /**
     * 发送人id
     */
    @Column(comment = "发送人id")
    private Integer sendId;


    /**
     * 状态
     */
    @Column(comment = "状态 -1.删除 1.正常", defaultValue = "1")
    private Integer status;


    /**
     * 推送状态
     */
    @Column(comment = "推送状态 1.推送成功 2.推送失败", defaultValue = "0")
    private Integer pushStatus;

    /**
     * 推送失败原因
     */
    @Column(comment = "推送失败原因", length = 512)
    private String reason;


    /**
     * 患教文章是否已读 根据类型区分字段
     */
    @Column(comment = "是否已读 0.未读 1.已读", length = 4, defaultValue = "0")
    private Integer isRead;

    /**
     * 随访问卷
     */
    @Column(comment = "随访问卷内容", type = MySqlTypeConstant.TEXT)
    private String content;

    /**
     * 随访是否填写
     */
    @Column(comment = "是否填写 0.未填写 1.已填写", defaultValue = "0")
    private Integer isWrite;

    /**
     * 提交时间
     */
    @Column(comment = "提交时间")
    private LocalDateTime submitDate;

    /**
     * 填写时间
     */
    @Column(comment = "填写时间")
    private LocalDateTime writeDate;

    /**
     * 次数
     */
    @Column(comment = "阅读次数", defaultValue = "0")
    private Integer num;


}
